<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>
        var a = prompt('请输入一个个位数')
        var b = prompt('请输入一个个位数')

        fn(a, b)

        function fn(a, b) {
            if (a >= 10 || b >= 10) {
                return;
            }
            if (a > b) {
                var temp = a;
                a = b;
                b = temp;
            }
            //for循环生成i,j之间的所有值
            for (var i = a; i <= b; i++) {
                for (var j = a; j <= b; j++) {
                    if (i != j && j % 2 != 0) { //i!=j并且j不为偶数满足条件输出
                        console.log("" + i + j); //打印i,j的字符串输出
                    }
                }
            }
        }
    </script>
</body>

</html>